﻿using System;
using System.Web;


using ZX.Web.UI.Controls;
using ZX.SYS.Bussiness.Message;
namespace ZX.WebApp
{
    public partial class MessagePoolManage : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //DateTime dt = DateTime.Now;
            string strAction = this.GetStringFromQueryString("action", "");
            string strPoolID = this.GetStringFromQueryString("poolid", "");

            switch (strAction)
            {
                case "setSendState":
                    setSendState(strPoolID);
                    break;
                default:
                    setSendState(strPoolID);
                    break;

            }

        }
        private void setSendState(string MPoolID)
        {

            bool b = false;
            int i = 0;
            try
            {
                if (!string.IsNullOrEmpty(MPoolID))
                {
                    i = new BDatMessagePool().setSendState(new Guid(MPoolID));
                    if (i > 0) { b = true; }
                }
            }
            catch { b = false; }

            if (b)
            {
                HttpContext.Current.Response.Write("1");
            }
            else
            {
                HttpContext.Current.Response.Write("0");
            }
        }

    }
}